Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update aggregate_metrics_df to work with None values #522

Merged
merged 12 commits into from
Dec 17, 2024
Merged

Conversation

d-a-bunin
Copy link
Collaborator

@d-a-bunin d-a-bunin commented Dec 10, 2024

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

See #518.

Closing issues

Closes #518.

Copy link

github-actions bot commented Dec 10, 2024

🚀 Deployed on https://deploy-preview-522--etna-docs.netlify.app

@github-actions github-actions bot temporarily deployed to pull request December 10, 2024 13:05 Inactive
@github-actions github-actions bot temporarily deployed to pull request December 11, 2024 12:22 Inactive
@github-actions github-actions bot temporarily deployed to pull request December 11, 2024 13:12 Inactive
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.35%. Comparing base (904e626) to head (69b782a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #522      +/-   ##
==========================================
+ Coverage   90.32%   90.35%   +0.02%     
==========================================
  Files         256      256              
  Lines       17227    17267      +40     
==========================================
+ Hits        15561    15601      +40     
  Misses       1666     1666              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot temporarily deployed to pull request December 11, 2024 14:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request December 11, 2024 15:49 Inactive
@d-a-bunin d-a-bunin requested a review from brsnw250 December 12, 2024 07:42
def mean_agg():
"""Mean for pandas agg."""

def func(x):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add typing here for clarity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it is probably pd.Series, but during debugging I saw how plain float were passed into this function (as I understand it leads to error and after this pandas passes the whole pd.Series inside).

@github-actions github-actions bot temporarily deployed to pull request December 13, 2024 11:53 Inactive
@d-a-bunin d-a-bunin requested a review from brsnw250 December 13, 2024 13:49
callback=callback,
)

# TODO: discuss the error here
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss this: it fails before we go into metrics computation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should support this behavior now. We can leave it as is for this task and create a separate issue to change this. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can try to mock here the part that blocks us from testing intended behavior.

callback=callback,
)

# TODO: discuss the error here
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss this: it fails before we go into metrics computation.

Comment on lines 175 to 178
("metrics_df_with_folds_with_missing", "aggregated_metrics_df_with_missing"),
("metrics_df_no_folds_with_missing", "aggregated_metrics_df_with_missing"),
("metrics_df_with_folds_with_full_missing", "aggregated_metrics_df_with_full_missing"),
("metrics_df_no_folds_with_full_missing", "aggregated_metrics_df_with_full_missing"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove these tests?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just rearranged the tests. I put all of the possible cases in a single fixture.

callback=callback,
)

# TODO: discuss the error here
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should support this behavior now. We can leave it as is for this task and create a separate issue to change this. What do you think?

callback=callback,
)

# TODO: discuss the error here
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can try to mock here the part that blocks us from testing intended behavior.

@github-actions github-actions bot temporarily deployed to pull request December 16, 2024 12:28 Inactive
@d-a-bunin d-a-bunin requested a review from brsnw250 December 16, 2024 13:26
brsnw250
brsnw250 previously approved these changes Dec 17, 2024
@github-actions github-actions bot temporarily deployed to pull request December 17, 2024 08:36 Inactive
@d-a-bunin d-a-bunin merged commit 5b17421 into master Dec 17, 2024
17 checks passed
@d-a-bunin d-a-bunin deleted the issue-518 branch December 17, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update aggregate_metrics_df to work with None values
2 participants